package oop2.Task1;

public class Dog {
    String name;
    Hedgehog a;

    public Dog() {
    }

    public Dog(String name) {
        this.name = name;
    }


    public void bite(Dog d) {
        System.out.println("小狗" + name + "咬了" + d.name + ",留下一嘴毛");
    }

    public void bite(Hedgehog b) {
        System.out.println("小狗" + name + "咬了刺猬" + b.name + ",无从下口");
    }

    public void bite(GoodPerson c) {
        System.out.println("小狗" + name + "咬了好人" + c.name + ",留下千古骂名");
    }

}
